Action

open class Action(source)

Structure to encapsulate a named action that can be shown as part of this notification. It must include an icon, a label, and a PendingIntent to be fired when the action is selected by the user. Action buttons won't appear on platforms prior to Android JELLY_BEAN.

As of Android N, action button icons will not be displayed on action buttons, but are still required and are available to notification listeners, which may display them in other contexts, for example on a wearable device.

Apps should use addAction or addAction to attach actions.

Constructors

Link copied to clipboard
constructor(icon: Int, @Nullable title: CharSequence, @Nullable intent: PendingIntent)
constructor(@Nullable icon: IconCompat, @Nullable title: CharSequence, @Nullable intent: PendingIntent)
Note: For devices running an Android version strictly lower than API level 23 this constructor only supports resource-ID based IconCompat objects.

Types

Link copied to clipboard
class Builder
Builder class for Action objects.
Link copied to clipboard
interface Extender
Extender interface for use with extend.
Link copied to clipboard
Provides meaning to an Action that hints at what the associated PendingIntent will do.
Link copied to clipboard
Wearable extender for notification actions.

Properties

Link copied to clipboard
Intent to send when the user invokes this action.
Link copied to clipboard
open var icon: Int
Small icon representing the action.
Link copied to clipboard
SemanticAction: Archive the content associated with the notification.
Link copied to clipboard
SemanticAction: Call a contact, group, etc.
Link copied to clipboard
SemanticAction: Delete the content associated with the notification.
Link copied to clipboard
SemanticAction: Mark content as read.
Link copied to clipboard
SemanticAction: Mark content as unread.
Link copied to clipboard
SemanticAction: Mute the content associated with the notification.
Link copied to clipboard
SemanticAction: No semantic action defined.
Link copied to clipboard
SemanticAction: Reply to a conversation, chat, group, or wherever replies may be appropriate.
Link copied to clipboard
SemanticAction: Mark content with a thumbs down.
Link copied to clipboard
SemanticAction: Mark content with a thumbs up.
Link copied to clipboard
SemanticAction: Unmute the content associated with the notification.
Link copied to clipboard
Title of the action.

Functions

Link copied to clipboard
Link copied to clipboard
Return whether the platform should automatically generate possible replies for this Action
Link copied to clipboard
Get the list of inputs to be collected from the user that ONLY accept data when this action is sent.
Link copied to clipboard
Get additional metadata carried around with this Action.
Link copied to clipboard
open fun getIcon(): Int
Link copied to clipboard
Return the icon associated with this Action.
Link copied to clipboard
Get the list of inputs to be collected from the user when this action is sent.
Link copied to clipboard
Returns the SemanticAction associated with this Action.
Link copied to clipboard
Return whether or not triggering this Action's PendingIntent will open a user interface.
Link copied to clipboard
Link copied to clipboard
Returns whether the OS should only send this action's PendingIntent on an unlocked device.
Link copied to clipboard
open fun isContextual(): Boolean
Returns whether this is a contextual Action, i.e.